﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core.Implements;
using Cofe.Core.Property;
using Cofe.IO.Implements;
using Cofe.Media;

namespace Cofe.IO
{
    public class MediaPropertyExpressionDefinitions : PropertyExpressionDefinitionBase<CofeMediaProperties>
    {
        public MediaPropertyExpressionDefinitions()
        {
            registerPropertyExpression(CofeMediaProperties.Width, e => (e as MediaInfo).Width);
            registerPropertyExpression(CofeMediaProperties.Height, e => (e as MediaInfo).Height);
        }
    }

    public class ExifPropertyExpressionDefinitions : PropertyExpressionDefinitionBase<ExifProperties>
    {
        public ExifPropertyExpressionDefinitions()
        {
            registerPropertyExpression(ExifProperties.CameraModel, e => (e as ImageInfo).CameraModel);
            registerPropertyExpression(ExifProperties.CameraMaker, e => (e as ImageInfo).CameraMaker);
            registerPropertyExpression(ExifProperties.Aperture, e => (e as ImageInfo).Aperture);
            registerPropertyExpression(ExifProperties.FNumber, e => (e as ImageInfo).FNumber);
            registerPropertyExpression(ExifProperties.ExposureTime, e => (e as ImageInfo).ExposureTime);
            registerPropertyExpression(ExifProperties.ISO, e => (e as ImageInfo).ISO);
            registerPropertyExpression(ExifProperties.FocalLength, e => (e as ImageInfo).FocalLength);
            registerPropertyExpression(ExifProperties.Flash, e => (e as ImageInfo).Flash);
            registerPropertyExpression(ExifProperties.DateTime, e => (e as ImageInfo).DateTime);
        }
    }
}
